<!DOCTYPE HTML>
<html>
<head>
    <title>markdown预览</title>

    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
    <script src="/js/showdown.min.js"></script>
    <script src="js/jquery-3.3.1.min.js"></script>
    <style type="text/css">
        #result {
            width: 100%;
            height: 600px;
        }
    </style>
    <link rel="icon" type="image/x-icon" href="search.ico">
</head>
<body>

<div id="result"></div>
<script>
    var converter = new showdown.Converter();

    var url = '[[${fileUrl}]]';
    $.ajax({
        url: url,
        type: 'get',
        data: {},
        cache: false,
        success: function (res) {
            var html = converter.makeHtml(res);
            document.getElementById("result").innerHTML = html;
        },
        error: function (res) {
        }
    });
</script>
</body>
</html>